package test04.sync.test06;

/**
 *
 *  * 银行可取钱对象(取钱的方式)  -- 银行卡、存折
 * @Author lzp
 * @Date 2024-03-21
 */
public class BankThread extends Thread{
    /**
     * 账户
     */
    private Account account;

    /**
     * 用户名
     */
    private String name;

    /**
     * 钱
     */
    private double money;

    public BankThread() {

    }

    public BankThread(Account account,String name,double money) {
        this.account = account;
        this.name =name;
        this.money =money;
    }


    @Override
    public void run() {
        account.getMoney(name,money);
    }
}
